package com.magicode.cms.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.magicode.cms.common.assist.UtilPath;
import com.magicode.cms.dao.IVideoPlayHistoryDao;
import com.magicode.cms.entiy.base.VideoPlayHistory;
import com.magicode.cms.service.IVideoPlayHistoryService;
import com.magicode.common.dao.PageResults;
@Service("serviceVideoPlayHistory")
public class VideoPlayHistoryServiceImpl  extends BaseServiceImpl<VideoPlayHistory,IVideoPlayHistoryDao> implements IVideoPlayHistoryService,UtilPath{
	public void deleteVideoPlayHistorylist(String userid){
		videoPlayHistoryDao.deleteVideoPlayHistorylist(userid);
	}
	@Override
	public List<Map<String, Object>> grid(Map<String, String> querywhere) {
		return null;
	}
	@Override
	public List<Map<String, Object>> getBeanInfo() {
		return null;
	}
	@Autowired
	@Qualifier("daoVideoPlayHistory")
	private IVideoPlayHistoryDao videoPlayHistoryDao;
	@Override
	public String getHql(Map<String, String> querywhere) throws Exception {
		String hql = " from "+VideoPlayHistory.class.getName()+" "+entity_alias_name+" where 1=1 ";
		if(null!=querywhere && !querywhere.isEmpty()){
			if(querywhere.containsKey(field_id)){
				hql = hql+" and "+entity_alias_name+".id='"+querywhere.get(field_id)+"'";
			}
		}
		return hql;
	}

	

	@Override
	public IVideoPlayHistoryDao getDao() throws Exception {
		// TODO Auto-generated method stub
		return videoPlayHistoryDao;
	}

	public IVideoPlayHistoryDao getVideoPlayHistoryDao() {
		return videoPlayHistoryDao;
	}

	public void setVideoPlayHistoryDao(IVideoPlayHistoryDao videoPlayHistoryDao) {
		this.videoPlayHistoryDao = videoPlayHistoryDao;
	}
	@Override
	public PageResults VideoPlayHistorylist(Map<String, String> prams,
			Integer pageNo, Integer pageSize) {
		// TODO Auto-generated method stub
		return getVideoPlayHistoryDao().VideoPlayHistorylist(prams, pageNo, pageSize);
	}
	@Override
	public VideoPlayHistory getVideoPlayHistory(String id, String id2) {
		// TODO Auto-generated method stub
		return null;
	}

	

}
